<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'user_show.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  	<h2>user show page</h2>
  	<hr>
	  <table border="1">
	  <tr bgcolor="green">
	  	<td>id</td>
	  	<td>username</td>
	  	<td>password</td>
	  	<td>delete</td>
	  	<td>modify</td>
	  </tr>
	  <s:iterator value="userList" var="user">
	  <tr>
	  	<td>${user.id }</td>
	  	<td>${user.username }</td>
	  	<td>${user.password }</td>
	  	<s:url action="deleteUserAction" var="deleteUser">
	  		<s:param name="id">${user.id}</s:param>
	  	</s:url>
	  	<s:url action="selectUserAction" var="selectUser">
	  		<s:param name="id">${user.id}</s:param>
	  	</s:url>
	  	<td>
	  		<s:a href="%{deleteUser}">delete</s:a>
	  	</td>
	  	<td>
	  		<s:a href="%{selectUser}">modify</s:a>
	  	</td>
	  </tr>
	  </s:iterator>
	  </table>
	  <a href="user_add.jsp">new user</a>
	  
	  <s:debug></s:debug>
  </body>
</html>
